﻿@using MakeWeekConcerts.Models
@using Microsoft.AspNet.Mvc.Facebook.Models
@using Microsoft.AspNet.Mvc.Facebook
@model MyFriendDetails
@{
    ViewBag.Title = "Friend Details - " + Model.Friend.Name;
}

<article class="intro">
    <span id="profilePicture">
        @if (Model.Friend.Picture != null && Model.Friend.Picture.Data != null)
        {
            <img class="img-polaroid" src="@Model.Friend.Picture.Data.Url" />
        }
    </span>
    <h3>Shared interests with @Model.Friend.Name</h3>
</article>

<article id="content">
    <div>
        <h4>Shared Artists</h4>
        <table class="table-striped table-bordered">
            @if (Model.SharedArtists.Any()) {
                foreach (var artist in Model.SharedArtists)
                {
                    <tr><td>You both like <a target="_top" href="@GlobalFacebookConfiguration.Configuration.AppUrl@Url.Action("ArtistDetails", new { artistName = artist })">@artist</a></td></tr>
                }
            } else {
                <tr><td>No Shared Artists.</td></tr>
            }
        </table>
        <h4>Shared Similar Artists</h4>
        <table class="table-striped table-bordered">
            @if (Model.SharedSimilar.Any())
            {
                foreach (var artist in Model.SharedSimilar)
                {
                    <tr>
                      <td>
                        They like <a target="_top" href="@GlobalFacebookConfiguration.Configuration.AppUrl@Url.Action("ArtistDetails", new { artistName = artist.Key })">@artist.Key</a>
                          who is similar to <a target="_top" href="@GlobalFacebookConfiguration.Configuration.AppUrl@Url.Action("ArtistDetails", new { artistName = artist.Value })">@artist.Value</a>
                      </td>
                    </tr>
                }
            }
            else
            {
                <tr><td>No Shared Similar Artists.</td></tr>
            }
        </table>
    </div>
</article>